Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Dec 29, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

ChrisRackauckas and others added 2 commits December 29, 2025 00:04
This PR fixes issue #36 by:

1. Adding an `ifelse` helper function definition in MATLAB
   - MATLAB doesn't have a built-in `ifelse` function, but Symbolics.jl
     generates code using `ifelse(cond, a, b)` for the MATLAB target
   - We now define `ifelse = @(cond, a, b) cond .* a + ~cond .* b;`
     before evaluating the generated MATLAB code

2. Updating ModelingToolkit compat to support versions 8, 9, 10, 11
   - The original error "TypeError: non-boolean (Num) used in boolean context"
     was fixed in newer ModelingToolkit/Symbolics versions
   - Added compatibility shim for the `states` -> `unknowns` API change

Fixes #36

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Fix ifelse support and update ModelingToolkit compat
@pull pull bot locked and limited conversation to collaborators Dec 29, 2025
@pull pull bot added the ⤵️ pull label Dec 29, 2025
@pull pull bot merged commit 0a71d7f into juliamatlab:master Dec 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant